package main.java.day07;

import java.io.*;

/**
 * 使用文件流复制myfile.txt文件为myfile_cp.txt
 *
 * @author Xiloer
 */
public class Test01 {
    public static void main(String[] args) throws IOException {
        FileInputStream in = new FileInputStream("myfile.txt");
        FileOutputStream out = new FileOutputStream("myfile_cp.txt");
        int b = 0;
        byte[] buff = new byte[8192];
        while ((b = in.read(buff)) != -1) {
            out.write(buff);
        }
        in.close();
        out.close();
    }

}
